using System.Drawing;

namespace Battle
{
    public class FighterHuman : Fighter
    {
        private readonly Tablee _table;

        public FighterHuman(string name, Tablee table)
            : base(name)
        {
            _table = table;
            _table.OnClick += OnTableClick;
        }

        private void OnTableClick(object sender, ShootingEventArgs e)
        {
            if (Shots.ContainsKey(new Point(e.X, e.Y)))
            {
                return;
            }

            Target(e.X, e.Y);
        }
    }
}